import base from '@/api/baseurl';
import request from '@/utils/request'

/**
 * 查询期限
 * @param {*} query
 * @returns
 */
export function queryComparableBrokers(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/comparablesecurities/findComparablesecurities',
    method: 'get',
    params: query
  })
}

/**
 * 单行删除
 * @param {*} query
 * @returns
 */
export function deleteComparablesecurities(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/comparablesecurities/deleteComparablesecurities',
    method: 'get',
    params: query
  })
}

/**
 * 增加
 * @param {*} data
 * @returns
 */
export function addComparablesecurities(data) {
  return request({
    baseURL: base.appBaseApi,
    url: '/comparablesecurities/addComparablesecurities',
    method: 'post',
    data
  })
}

/**
 * 获取新增列表
 * @param {*} data
 * @returns
 */
export function getNewList() {
  return request({
    baseURL: base.appBaseApi,
    url: '/comparablesecurities/findinsertlist',
    method: 'post',
  })
}

/**
 * 修改期限
 * @param {*} data
 * @returns
 */
export function updateComparablesecurities(data) {
  return request({
    baseURL: base.appBaseApi,
    url: '/comparablesecurities/updateComparablesecurities',
    method: 'post',
    data
  })
}

/**
 * 获取批量删除和修改的列表
 * @param {*} data
 * @returns
 */
export function getBatchList() {
  return request({
    baseURL: base.appBaseApi,
    url: '/comparablesecurities/commonparamsall',
    method: 'post',
  })
}

// 批量修改
export function batchupdate(data) {
  return request({
    baseURL: base.appBaseApi,
    url: '/comparablesecurities/batchupdate',
    method: 'post',
    data
  })
}

// 批量修改
export function batchdelete(data) {
  return request({
    baseURL: base.appBaseApi,
    url: '/comparablesecurities/batchdelete',
    method: 'post',
    data
  })
}
